import { BaseViewModel } from '@ohos/lib_common'
import { API } from '../../../common/constants/api'

export interface Config {
  HOME_CHECKED_TAB: string
  HOME_UNCHECKED_TAB: string
  MALL_CHECKED_TAG: string
  MALL_UNCHECKED_TAB: string
  PROGRAM_CHECKED_TAB: string
  PROGRAM_UNCHECKED_TAB: string
  MINE_CHECKED_TAB: string
  MINE_UNCHECKED_TAB: string
  TOP_TAB: string
  ISSUE_TAB: string
}

// 请求系统配置信息
export class SysConfig extends BaseViewModel {
  async getSysConfig() {
    const res = await this.get<Config>({ url: API.SYSTEM_CONFIG })
    return res;
  }
}

export const sysConfig = new SysConfig();

